package com.ymttest.common.enums;

/**
 * 活动促销类型
 */
public enum ActivityPromotionTypeEnum {
	/**
	 * 折扣
	 */
	DiscountRate(1),

	/**
	 * 直降
	 */
	DiscountPrice(2),

	/**
	 * 折后价
	 */
	AfterDiscountPrice(3);

	private int intValue;
	private static java.util.HashMap<Integer, ActivityPromotionTypeEnum> mappings;

	private synchronized static java.util.HashMap<Integer, ActivityPromotionTypeEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, ActivityPromotionTypeEnum>();
		}
		return mappings;
	}

	private ActivityPromotionTypeEnum(int value) {
		intValue = value;
		ActivityPromotionTypeEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static ActivityPromotionTypeEnum forValue(int value) {
		return getMappings().get(value);
	}
}